package com.wander.designStructural.flyweight;

/**
 * 具体享元类
 * @author WDYin
 * @date 2023/5/30
 **/
public class ConcreteFlyweight implements Flyweight {

    private String intrinsicState;

    public ConcreteFlyweight(String intrinsicState) {
        this.intrinsicState = intrinsicState;
        System.out.println("具体享元" + intrinsicState + "被创建");
    }

    @Override
    public void operation(String extrinsicState) {
        System.out.println("具体享元" + intrinsicState + "被调用，非享元信息为" + extrinsicState);
    }
}
